This project investigates the racial gerrymandering in Alabama’s 2021 and 2023 congressional districts using area weighted reaggregation of census blockgroup data to convex hull and minimum bounding circle geometries. Compactness scores for each district are calculated and compared.
Key words: Comma-separated list of keywords (tags) for
searchability. Geographers often use one or two keywords each for:
theory, geographic context, and methods.Subject: select from the BePress
TaxonomyDate created: date when project was startedDate modified: date of most recent revisionSpatial Coverage: Specify the geographic extent of your
study. This may be a place name and link to a feature in a gazetteer
like GeoNames or OpenStreetMap, or a well known text (WKT)
representation of a bounding box.Spatial Resolution: Specify the spatial resolution as a
scale factor, description of the level of detail of each unit of
observation (including administrative level of administrative areas),
and/or or distance of a raster GRID sizeSpatial Reference System: Specify the geographic or
projected coordinate system for the study, e.g. EPSG:4326Temporal Coverage: Specify the temporal extent of your
study—i.e. the range of time represented by the data observations.Temporal Resolution: Specify the temporal resolution of
your study—i.e. the duration of time for which each observation
represents or the revisit period for repeated observationsThis is an original study based on literature on gerrymandering metrics.
It is an exploratory study to evaluate usefulness of new gerrymandering metrics based on representativness in the convex hull and minimum bounding circle compared to the congressional district.
I plan on using package … for …
We plan on using data sources precincts20, districts21, & districts23 from the districts gpkg and blockgroups2020 from the 2020 Decennial Census.
## Driver: GPKG
## Available layers:
## layer_name geometry_type features fields crs_name
## 1 districts21 Multi Polygon 7 4 WGS 84
## 2 districts23 Multi Polygon 7 4 NAD83
## 3 precincts20 Multi Polygon 1972 8 NAD83
Title: Voting Precincts 2020Abstract: Alabama 2020 voting precincts with election data (votes for Biden and Trump)Spatial Coverage: AlabamaSpatial Resolution: voting precinctsSpatial Reference System: EPSG 4269 NAD 1983 geographic coordinate systemTemporal Coverage: voting precincts used for tabulating the 2020 electionTemporal Resolution: annual electionLineage: Saved a sgeopackage format. Processing prior to download is explained in al_vest_20_validation_report.pdfDistribution: Data available at Redistricting Data Hub with free loginConstraints: Permitted for noncommercial and nonpartisan use only. Copyright and use constraints explained in redistrictinghub_legal.txtData Quality: n/aVariables: For each variable, enter the following information. If you have two or more variables per data source, you may want to present this information in table form (shown below)
Label: variable name as used in the data or codeAlias: intuitive natural language nameDefinition: Short description or definition of the variable. Include measurement units in description.Type: data type, e.g. character string, integer, realAccuracy: e.g. uncertainty of measurementsDomain: Expected range of Maximum and Minimum of numerical data, or codes or categories of nominal data, or reference to a standard codebookMissing Data Value(s): Values used to represent missing data and frequency of missing data observationsMissing Data Frequency: Frequency of missing data observations: not yet known for data to be collected| Label | Alias | Definition | Type | Accuracy | Domain | Missing Data Value(s) | Missing Data Frequency |
|---|---|---|---|---|---|---|---|
| VTDST20 | VDID | voting district ID | … | … | … | … | … |
| GEOID20 | GEOID | unique geographic ID | … | … | … | … | … |
| G20PRETRU | trump | total votes for Trump in 2020 | … | … | … | … | … |
| G20PREBID | biden | total votes for Biden in 2020 | … | … | … | … | … |
## Reading layer `districts23' from data source
## `/Users/m/Desktop/School/Middlebury/Senior/spring25/Open/github/OR-Gerrymander-Alabama/data/raw/public/alabama/districts.gpkg'
## using driver `GPKG'
## Simple feature collection with 7 features and 4 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -88.47323 ymin: 30.14443 xmax: -84.88825 ymax: 35.00803
## Geodetic CRS: NAD83
Map the districts
##
## ── tmap v3 code detected ───────────────────────────────────────────────────────
## [v3->v4] `tm_text()`: migrate the layer options 'just' to 'options =
## opt_tm_text(<HERE>)'
## [tm_text()] Argument `on_surface` unknown.
Title: blockgroups2020Abstract: vector polygon geopackage layer of census
tracts and demographic dataSpatial Coverage: AlabamaSpatial Resolution: Census block groupsSpatial Reference System: EPSG:4269 NAD 1983 geographic
coordinate systemTemporal Coverage: 2020 censusTemporal Resolution: n/aLineage: taken from U.S. Census API “pl” public law
summary file using tidycensus in RDistribution: U.S. Census APIConstraints: Public Domain data free for use and
redistributionData Quality: n/aVariables: For each variable, enter the following
information. If you have two or more variables per data source, you may
want to present this information in table form (shown below)
Label: variable name as used in the data or codeAlias: intuitive natural language nameDefinition: Short description or definition of the
variable. Include measurement units in description.Type: data type, e.g. character string, integer,
realAccuracy: e.g. uncertainty of measurementsDomain: Range (Maximum and Minimum) of numerical data,
or codes or categories of nominal data, or reference to a standard
codebookMissing Data Value(s): Values used to represent missing
data and frequency of missing data observationsMissing Data Frequency: Frequency of missing data
observations| Label | Alias | Definition | Type | Accuracy | Domain | Missing Data Value(s) | Missing Data Frequency |
|---|---|---|---|---|---|---|---|
| GEOID | … | code to uniquely identify tracts | … | … | … | … | … |
| P4_001N | … | Total Population, 18 years or older | … | … | … | … | … |
| P4_006N | … | Total: Not Hispanic or Latino, Population of one race, Black or African American alone, 18 years or older | … | … | … | … | … |
| P5_003N | … | Total institutionalized population in correctional facilities for adults, 18 years or older | … | … | … | … | … |
Acquire census block group data using tidycensus
package. First query metadata for the pl public law data
series.
In the 2023 court cases on Alabama’s redistricting, it was argued that Alabama had a racial gerrymander discriminating against Black and African American voters. Therefore, we will analyze data on the voting age population based on Black and non-black voters. This data is found in table P3.
Query the public law data series table P3 on “race for the population 18 years and over”.
## Reading layer `block_groups' from data source
## `/Users/m/Desktop/School/Middlebury/Senior/spring25/Open/github/OR-Gerrymander-Alabama/data/raw/public/block_groups.gpkg'
## using driver `GPKG'
## Simple feature collection with 3925 features and 83 fields (with 1 geometry empty)
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -88.47323 ymin: 30.22333 xmax: -84.88908 ymax: 35.00803
## Geodetic CRS: NAD83
Previously, racial and voting data were analyzed for 2016 and 2020 voting districts. Compactness was assessed using the ratio of area to perimeter squared to determine relative shape to a circle.
Prior to analysis, only metadata have been observed for each data source.
This study is an exploration of the modifiable aerial unit problem (MAUP). Compactness is arbitrarily defined and fairness (presence of a racial or political gerrymander) is also subjective. The bounding circle and convex hull methods are an attempt to apply different metrics and analyze results to form a more robust understanding of compactness and fairness in Alabama voting districts. However, geographic features such as natural boundaries (coastlines, rivers, mountain ranges etc.) and urban settlement patterns complicate the use of universal metrics like the ones explored in the study.
Reproject CRS to ESPG: 4269 and calculate Black population.
Calculate geometry area.
Reproject CRS to ESPG: 4269.
Extract all P3 reporting categories with people who
identify as Black.
| X | name | label |
|---|---|---|
| 151 | P3_004N | !!Total:!!Population of one race:!!Black or African American alone |
| 158 | P3_011N | !!Total:!!Population of two or more races:!!Population of two races:!!White; Black or African American |
| 163 | P3_016N | !!Total:!!Population of two or more races:!!Population of two races:!!Black or African American; American Indian and Alaska Native |
| 164 | P3_017N | !!Total:!!Population of two or more races:!!Population of two races:!!Black or African American; Asian |
| 165 | P3_018N | !!Total:!!Population of two or more races:!!Population of two races:!!Black or African American; Native Hawaiian and Other Pacific Islander |
| 166 | P3_019N | !!Total:!!Population of two or more races:!!Population of two races:!!Black or African American; Some Other Race |
| 174 | P3_027N | !!Total:!!Population of two or more races:!!Population of three races:!!White; Black or African American; American Indian and Alaska Native |
| 175 | P3_028N | !!Total:!!Population of two or more races:!!Population of three races:!!White; Black or African American; Asian |
| 176 | P3_029N | !!Total:!!Population of two or more races:!!Population of three races:!!White; Black or African American; Native Hawaiian and Other Pacific Islander |
| 177 | P3_030N | !!Total:!!Population of two or more races:!!Population of three races:!!White; Black or African American; Some Other Race |
| 184 | P3_037N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; American Indian and Alaska Native; Asian |
| 185 | P3_038N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; American Indian and Alaska Native; Native Hawaiian and Other Pacific Islander |
| 186 | P3_039N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; American Indian and Alaska Native; Some Other Race |
| 187 | P3_040N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; Asian; Native Hawaiian and Other Pacific Islander |
| 188 | P3_041N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; Asian; Some Other Race |
| 189 | P3_042N | !!Total:!!Population of two or more races:!!Population of three races:!!Black or African American; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 195 | P3_048N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; American Indian and Alaska Native; Asian |
| 196 | P3_049N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; American Indian and Alaska Native; Native Hawaiian and Other Pacific Islander |
| 197 | P3_050N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; American Indian and Alaska Native; Some Other Race |
| 198 | P3_051N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; Asian; Native Hawaiian and Other Pacific Islander |
| 199 | P3_052N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; Asian; Some Other Race |
| 200 | P3_053N | !!Total:!!Population of two or more races:!!Population of four races:!!White; Black or African American; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 205 | P3_058N | !!Total:!!Population of two or more races:!!Population of four races:!!Black or African American; American Indian and Alaska Native; Asian; Native Hawaiian and Other Pacific Islander |
| 206 | P3_059N | !!Total:!!Population of two or more races:!!Population of four races:!!Black or African American; American Indian and Alaska Native; Asian; Some Other Race |
| 207 | P3_060N | !!Total:!!Population of two or more races:!!Population of four races:!!Black or African American; American Indian and Alaska Native; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 208 | P3_061N | !!Total:!!Population of two or more races:!!Population of four races:!!Black or African American; Asian; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 211 | P3_064N | !!Total:!!Population of two or more races:!!Population of five races:!!White; Black or African American; American Indian and Alaska Native; Asian; Native Hawaiian and Other Pacific Islander |
| 212 | P3_065N | !!Total:!!Population of two or more races:!!Population of five races:!!White; Black or African American; American Indian and Alaska Native; Asian; Some Other Race |
| 213 | P3_066N | !!Total:!!Population of two or more races:!!Population of five races:!!White; Black or African American; American Indian and Alaska Native; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 214 | P3_067N | !!Total:!!Population of two or more races:!!Population of five races:!!White; Black or African American; Asian; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 216 | P3_069N | !!Total:!!Population of two or more races:!!Population of five races:!!Black or African American; American Indian and Alaska Native; Asian; Native Hawaiian and Other Pacific Islander; Some Other Race |
| 218 | P3_071N | !!Total:!!Population of two or more races:!!Population of six races:!!White; Black or African American; American Indian and Alaska Native; Asian; Native Hawaiian and Other Pacific Islander; Some Other Race |
Next, sum all of the categories of populations who identify as Black.
bgarea calculates the geographic area of each blockgroup
Total is the total population 18 years or older
PctBlack is the percentage of Total that is
Black CheckPct sums the calculated Black population and the
white population and divides by the total representing percent of the
population considered in this analysis. This should be a close
underestimate (~100) in Alabama.
Save the results.
## Deleting layer `blockgroups_calc' using driver `GPKG'
## Writing layer `blockgroups_calc' to data source
## `/Users/m/Desktop/School/Middlebury/Senior/spring25/Open/github/OR-Gerrymander-Alabama/data/derived/public/blockgroups_calc.gpkg' using driver `GPKG'
## Writing 3925 features with 6 fields and geometry type Multi Polygon.
## ℹ tmap mode set to "plot".
And plot results to visualize.
Now, we visualize the 2023 districts overlaid on blockgroups by pctBlack
## ℹ tmap mode set to "view".
## Registered S3 method overwritten by 'jsonify':
## method from
## print.json jsonlite
## Variable bgcol and bgcol_alpha not supported by view mode